package com.yfp.operation.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 *
 * @version 1.0
 * @date 2024-05-28 16:36
 */
@Getter
@AllArgsConstructor
public enum DateEnums {

    MONTH("MONTH","month"),
    WEEK("WEEK","week"),
    DAY("DAY","day");


    private String type;
    private String name;


    public static String getName(String type) {
        for (DateEnums c : DateEnums.values()) {
            if (c.getType().equals(type)) {
                return c.name;
            }
        }
        return null;
    }


}
